import React from 'react';

import { BrowserRouter, HashRouter} from 'react-router-dom';

import App from './App.js';


import { PersistGate } from "redux-persist/lib/integration/react";

import {Provider} from 'react-redux';

// import Store from './store/store.js';
// console.log(Store.getState())
// const unsubscribe = Store.subscribe(() =>{
//   console.log(Store.getState())
//   localStorage.setItem("ljmRout", JSON.stringify(Store.getState()));
// })
import Store, { persistor } from './store/store0.js';

const Router = () => (
    <BrowserRouter>
        <Provider store={Store}>
            <PersistGate loading={null} persistor={persistor}>
                <App/>
            </PersistGate>
        </Provider>
    </BrowserRouter>
)
export default Router;
